package cqrtplm.controller;


import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ty.basic.response.ResponseResult;
import cqrtplm.constant.RouteConstant;
import cqrtplm.dto.RTCertFiledFormDTO;
import cqrtplm.dto.RTCertOAEPANewFormDTO;
import cqrtplm.dto.RTOARETDTO;
import cqrtplm.entity.RTProductDevelopmentOrderDO;
import cqrtplm.entity.RtCertFiledDO;
import cqrtplm.service.BOMCertificationService;
import cqrtplm.service.RtCertApplicationService;
import cqrtplm.service.RtCertFiledService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 机型认证控制器
 */
@RestController
@Api(tags = "认证-机型认证")
@RequestMapping("/rest"+RouteConstant.RATO + "cert/application/" + "v1")
public class RtCertApplicationController {

    @Resource
    private RtCertApplicationService  rtCertApplicationService ;

    @GetMapping("/create")
    public ResponseResult createNewDocObject(@RequestParam("ctype") String ctype,
                                             @RequestParam("backupType")  String backupType,
                                             @RequestParam("code")  String code) {
        try {
            // 调用校验方法，传入必要的两个参数
            rtCertApplicationService.CreateNewDocObject(ctype,backupType,code);
            return ResponseResult.success("11111");
        } catch (Exception e) {
            return ResponseResult.fail("200",e.getMessage());
        }
    }
}